/**
 *
 */
package com.ybkj.daijia.server.service.impl;

import com.ybkj.daijia.server.mapper.PayRecordOrderMapper;
import com.ybkj.daijia.server.model.PayRecordOrder;
import com.ybkj.daijia.server.service.PayRecordOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Shine
 */
@Service
public class DefaultPayRecordOrderService implements PayRecordOrderService {

    @Autowired
    private PayRecordOrderMapper payRecordOrderMapper;


    @Transactional(rollbackFor = Exception.class)
    public PayRecordOrder insertRecord(PayRecordOrder payRecordOrder) {

        payRecordOrderMapper.insertRecord(payRecordOrder);

        return payRecordOrder;
    }


    @Override
    public PayRecordOrder findOne(Long id) {

        return payRecordOrderMapper.selectByPrimaryKey(id);
    }


    @Override
    @Transactional(rollbackFor = Exception.class)
    public int updateByPrimaryKey(PayRecordOrder payRecordOrder) {

        return payRecordOrderMapper.updateByPrimaryKey(payRecordOrder);
    }


}

